<?php

namespace App\Admin\Controllers;

use App\Http\Controllers\Controller;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Grid;
use Dcat\Admin\Admin;
use Illuminate\Http\Request;
use App\Admin\Controllers\CabinetChildrenController;

class DataMonitoredController extends Controller
{
    public function index(Content $content)
    {
        $a = Admin::user()->roles->toArray();
        if($a[0]['id']==9){ //超级管理员可以删除
            return redirect('/admin/project/ProjectLocationView/8');
        }
        return redirect('/admin/new-index');
    }

    /**
     * 数据诊断辅助
     */
    public function sup(){
        Admin::js('/echarts/echarts.common.min.js');
        return redirect('/admin/cabinet-children/66');
    }
}
